{% extends "home.html" %}
{% block header %}Users List{% endblock %}
{% block title %} {% endblock %}
{% block navpanel %}
  <ul>
  <li id="bt_back" class="button"><a href="/"><span>Back</span></a></li>
  <li id="bt_profile" class="button"><a href="/profile/user"><span>My Profile</span></a></li>
  {% if is_user_admin %}
    <li id="bt_admin_users" class="button"><a href="/admin/user/list"><span>Users List</span></a></li>
    <li id="bt_admin_recipes" class="button"><a href="/admin/recipes/list"><span>Recipes List</span></a></li>
  {% endif%}
  </ul>
{% endblock %}
{% block main%}
  <header>
    <h2>{{ formName }}</h2>
  </header>
  <ul>
    {% for user in users %}
    <li> {{user.user.nickname}} - {{user.surname}} {{user.name}} - 
      {% if user.is_deleted %}
        <a href="/admin/user/undelete?id={{user.key}}">undelete</a>
      {% else %}
        <a href="/admin/user/delete?id={{user.key}}">delete</a> - 
        <a href="/admin/user/edit?id={{user.key}}">edit</a>
      {% endif %}
    </li>
    {% endfor %}
  </ul>
  <footer>
  </footer>
{% endblock %}
